#ifndef _INFOBLOCK_H
#define _INFOBLOCK_H

#define TGT_SIZE                            0x0C
//
#define FLASH_SIG_OFFSET_ADDRESS             0x0000B    //  >0x200(�ж���������ַ)
//#define FLASH_SIG_ADDRESS                  (APPLICATION_ADDRESS + FLASH_SIG_OFFSET_ADDRESS - SIG_SIZE)

/* Define the address from where user application will be loaded.
   Note: the 1st sector 0x08000000-0x08003FFF is reserved for the IAP code */
#define APPLICATION_ADDRESS                 0x08008000 
#define APPLICATION_END_ADDRESS             0x08017FFF 

//#define TGT_APP_INFOBLOCK_ADDRESS         (APPLICATION_ADDRESS + FLASH_SIG_OFFSET_ADDRESS - TGT_SIZE)
#define TGT_APP_INFOBLOCK_ADDRESS           (APPLICATION_END_ADDRESS - TGT_SIZE + 1)

// Defines for use in the InfoBlock
#define TGT_APP_INFOBLOCK_LENGTH    7

#define TGT_DEVICE_CODE             0x30

#define TGT_MCU_CODE                0x32  // Code for this MCU partnumber
#define TGT_BL_TYPE                 0x01  // UART BL
#define TGT_FLASH_PAGE_SIZE_CODE    11     // Flash Page Size Code: 2^9 => 512 bytes
#define APP_FW_VERSION_HIGH         1
#define APP_FW_VERSION_LOW          0
#define APP_BUILD_VERSION           0
#define BL_SPECIFIC_BYTE            0x25

// Signature Bytes
#define SIG_BYTE0                   0x3D
#define SIG_BYTE1                   0xC2
#define SIG_BYTE2                   0xA5
#define SIG_BYTE3                   0x1B

#endif//_INFOBLOCK_H
